home *** CD-ROM | disk | FTP | other *** search
- This package contains a complete replacement for the current Minix
- stdio package. The advantages offered by this replacement are:
-
- o speed
- o full support for unbuffered, line buffered and fully buffered
- modes of operation
- o support for update modes (r+, w+ and a+)
- o full varargs support
-
- Here are some results when running the t*.c timing programs using the new
- stdio and the older Minix stdio:
-
- real user sys output
- old tprintf 43.0 41.0 1.9 /dev/null
- new tprintf 20.0 18.3 2.0 /dev/null
- old tprintf 1:17.0 40.8 5.3 /dev/tty
- new tprintf 1:01.0 18.4 20.5 /dev/tty
-
- old tfwrite 21.0 19.6 1.3 /dev/null
- new tfwrite 5.0 2.6 0.8 /dev/null
- old tfwrite 32.0 19.4 3.5 /dev/tty
- new tfwrite 15.0 2.7 2.1 /dev/tty
-
- old tputc 4.0 3.1 0.1 /dev/null
- new tputc 2.0 1.0 0.7 /dev/null
- old tputc 8.0 3.1 1.0 /dev/tty *
- new tputc 16.0 4.8 11.0 /dev/tty *
-
- The only anomaly is in the last two lines with the new stdio lagging far behind
- Minix stdio. This is due to the fact that the Minix version of putc() (or at
- least the version that I have) does not support line buffered operation so
- putc() does not flush on receipt of '\n'. This means that the older stdio is
- operating in a fully buffered mode (compare the user times) whereas the new
- one is line buffering the data. Thus the comparison is not really valid.
-
- Here are some comparisons with the stdio provided on this Un*x system:
-
- real user sys
- new tputc 0.4 0.2 0.0
- pyr tputc 0.3 0.2 0.0
- new tprintf 12.4 2.6 0.6
- pyr tprintf 2.0 1.4 0.1
- new tfwrite 1.2 0.1 0.2
- pyr tfwrite 0.3 0.1 0.0
-
- As can be seen, the only real difference is in the printf test.
-
- The following files are provided:
-
- _allocbu.c stdio library
- _cleanup.c stdio library
- _filbuf.c stdio library
- _file.c stdio library
- _flsbuf.c stdio library
- _fopen.c stdio library
- _slot.c stdio library
- exercise.c exercise stdio
- fclose.c stdio library
- fdopen.c stdio library
- fflush.c stdio library
- fgetc.c stdio library
- fgets.c stdio library
- fopen.c stdio library
- fprintf.c stdio library
- fputc.c stdio library
- fputs.c stdio library
- fread.c stdio library
- freopen.c stdio library
- fscanf.c stdio library
- fseek.c stdio library
- ftell.c stdio library
- fwrite.c stdio library
- gets.c stdio library
- getw.c stdio library
- printf.c stdio library
- puts.c stdio library
- putw.c stdio library
- rewind.c stdio library
- scanf.c stdio library
- setbuf.c stdio library
- setvbuf.c stdio library
- sprintf.c stdio library
- sscanf.c stdio library
- stdio.c stdio library
- tfwrite.c timing stdio
- tprintf.c timing stdio
- tputc.c timing stdio
- ungetc.c stdio library
- vfprintf.c stdio library
- vfscanf.c stdio library
- vprintf.c stdio library
- vscanf.c stdio library
- vsprintf.c stdio library
- vsscanf.c stdio library
- bitset.h stdio internals
- prototype.h stdio internals
- stdio.h stdio library
- stdiolib.h stdio internals
-
- These files supersede all the stdio related files in the Minix library. Only
- stdio.h should be placed in the include directory. You can put proto.h in
- there too if you like. All other .h files are internal.
-
- There are two makefiles provided but they're both site specific (mine :-). You
- should be able to cobble one up. Basically all you need to do is to compile all
- the library modules and stick them in the library. You will also have to remove
- the old Minix stdio modules from the library (best to do this first).
-
- To compile the test programs, just compile and link them either with all the
- stdio modules if you haven't updated the library yet, or just with the library
- if you have updated it. You can also try linking them with the old Minix stdio
- modules if you want to compare the two.
-
- Make sure that MINIX is defined when you compile. (I'm not quite sure if that's
- predefined in Minix cc).
-
- Enjoy!
-
- Earl
-